<template>
  <aside>
    <el-button v-for="(btn,idx) in cfg" @click="toggle(btn.mode)" :key="btn.icon" size="small" type="primary" v-if="btn.mode!==mode">
      <span class="iconfont mr5" :class="btn.icon"></span>{{ btn.label }}
    </el-button>
  </aside>
</template>

<script>
export default {
  name: "Toolbar",
  props: ['cfg','mode','toggle'],
  data() {
    return {

    }
  },
  mounted() {
  },
  methods: {

  },
}
</script>

<style scoped lang="scss">
aside {
  width: 110px;
  z-index: 1000;
  position: absolute;
  bottom: 15px;
  right: 15px;

  button {
    margin: 5px 0 !important;
  }



}
</style>
